package reit.ass3;


/**
 * The Class ClerkDetails.
 */
class ClerkDetails implements NamableInterface,LocatableInterface {

	/** The m name. */
	private String mName;

	/** The m location. */
	private Location mLocation;

	/**
	 * Instantiates a new clerk details.
	 *
	 * @param name the name
	 * @param loc the loc
	 */
	ClerkDetails (final String name, final Location loc){
		this.mLocation=loc;
		this.mName=name;
	}

	/**
	 * Instantiates a new clerk details.
	 *
	 * @param name the name
	 * @param x the x
	 * @param y the y
	 */
	ClerkDetails (final String name, final Double x , final Double y){
		this.mLocation=new Location(x,y);
		this.mName=name;
	}

	/* (non-Javadoc)
	 * @see ass3.LocatableInterface#getLocation()
	 */
	@Override
	public Location getLocation() {
		return mLocation;
	}

	/* (non-Javadoc)
	 * @see ass3.LocatableInterface#getDistance(ass3.Location)
	 */
	@Override
	public Double getDistance(final Location loc) {	
		return Locatable.getDistance(this.getLocation(), loc);
	}

	/* (non-Javadoc)
	 * @see ass3.NamableInterface#getName()
	 */
	@Override
	public String getName() {
		return this.mName;
	}
}
